import java.util.ArrayDeque;
import java.util.Collections;
import java.util.Deque;

public class Main {

    public static void main(String[] args) {
        Deque<Event> ques = new ArrayDeque<Event>();
        WriteTask task = new WriteTask(ques);
        for (int i = 0; i < 3; i++) {
            Thread thread = new Thread(task);
            thread.setName("task" + i);
            thread.start();
        }
        CleanTask cleanTask = new CleanTask(ques);
        cleanTask.start();

    }

}
